﻿using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
namespace EMC.VISITOR.Application;

    /// <summary>
    /// 自定义编码规则输出参数
    /// </summary>
    public class BD_CodeGenerationDto
    {
        /// <summary>
        /// 表单类型
        /// </summary>
        public OrderType? OrderType { get; set; }
        
        /// <summary>
        /// 提交时间
        /// </summary>
        public CodeGenerationDateType? DateType { get; set; }
        
        /// <summary>
        /// 流水号
        /// </summary>
        public int Serialnumber { get; set; }
        
        /// <summary>
        /// 编号前缀
        /// </summary>
        public string? Prefix { get; set; }
        
        /// <summary>
        /// 编号生成规则描述
        /// </summary>
        public string FromRuleString { get; set; }
        
        /// <summary>
        /// 编号生成规则
        /// </summary>
        public string FromRule { get; set; }
        
        /// <summary>
        /// Id
        /// </summary>
        public long Id { get; set; }
        
    }

    
  /// <summary>
    /// 自定义编码规则导出导入
    /// </summary>
    [ExcelExporter(Name = "自定义编码规则", TableStyle = OfficeOpenXml.Table.TableStyles.None, AutoFitAllColumn = true,AutoCenter =true)]
    [ExcelImporter( IsLabelingError = true,SheetName ="自定义编码规则")]
    public class ExportImportBD_CodeGenerationDto
    {
        /// <summary>
        /// 表单类型
        /// </summary>
         [ExporterHeader(DisplayName = "表单类型", IsBold = true)]
        [ImporterHeader(Name = "表单类型")]
         [Required(ErrorMessage ="表单类型为必填字段！")]
        public OrderType? OrderType { get; set; }
        
        /// <summary>
        /// 提交时间
        /// </summary>
         [ExporterHeader(DisplayName = "提交时间", IsBold = true)]
        [ImporterHeader(Name = "提交时间")]
         [Required(ErrorMessage ="提交时间为必填字段！")]
        public CodeGenerationDateType? DateType { get; set; }
        
        /// <summary>
        /// 流水号
        /// </summary>
        [ExporterHeader(DisplayName = "流水号", IsBold = true)]
        [ImporterHeader(Name = "流水号")]
         [Required(ErrorMessage ="流水号为必填字段！")]
        public int? Serialnumber { get; set; }
        
        /// <summary>
        /// 编号前缀
        /// </summary>
        [ExporterHeader(DisplayName = "编号前缀", IsBold = true)]
        [ImporterHeader(Name = "编号前缀")]
        public string? Prefix { get; set; }
        
        /// <summary>
        /// 编号生成规则描述
        /// </summary>
        [ExporterHeader(DisplayName = "编号生成规则描述", IsBold = true)]
        [ImporterHeader(Name = "编号生成规则描述")]
         [Required(ErrorMessage ="编号生成规则描述为必填字段！")]
        public string? FromRuleString { get; set; }
        
        /// <summary>
        /// 编号生成规则
        /// </summary>
        [ExporterHeader(DisplayName = "编号生成规则", IsBold = true)]
        [ImporterHeader(Name = "编号生成规则")]
        public string? FromRule { get; set; }
        
    }